package com.longcai.feign.client;

import com.alibaba.fastjson.JSONObject;
import com.longcai.bean.ApiResult;
import com.longcai.constants.ServiceNameConstants;
import com.longcai.feign.factory.WebFeignClientFallbackFactory;
import com.longcai.vo.ClyjGoodsOrderDetailsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 * @author zhaojie
 * @Title: RemoteWebApi
 * @ProjectName CLYJ
 * @Description: TODO
 * @date 2019/2/1811:56
 */
@FeignClient(value = ServiceNameConstants.WEB_SERVICE, fallbackFactory = WebFeignClientFallbackFactory.class)
public interface WebFeignClient {

    /**
     * 获取商品+规格库存
     * @param params
     * @return
     */
    @PostMapping(value = "/clyjGoodsSpec/getGoodsSpec2")
    ApiResult getGoodsStock(@RequestBody JSONObject params);

    /**
     * 下单校验
     *
     * @param clyjGoodsOrderDetailsVo
     * @return
     */
    @PostMapping(value = "/clyjUserTouch/testOrder")
    ApiResult<?> testOrder(@RequestBody ClyjGoodsOrderDetailsVo clyjGoodsOrderDetailsVo);
}
